package com.qfedu.meidijiaju.controller;


import com.qfedu.meidijiaju.common.ResponseData;
import com.qfedu.meidijiaju.entity.UserYxy;
import com.qfedu.meidijiaju.service.UserYxyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author meidimeiju
 * @since 2022-10-03
 */
@Api(tags = "帖子点击用户头像模块")
@RestController
@RequestMapping("/meidijiaju/user-yxy")
public class UserYxyController {

    @Autowired
    private UserYxyService userYxyService;

    @ApiOperation(value = "/个人用户主页所有帖子")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "对应的用户id",required = true,paramType = "query",dataType = "int")
    })
    @RequestMapping(value = "/findUserByUserIdTieZi",method = RequestMethod.GET)
    public ResponseData<UserYxy> findUserByUserIdTieZi(int userId){

        return userYxyService.findUserByUserIdTieZi(userId);

    }

    @ApiOperation(value = "/个人用户主页所有食谱菜品")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId",value = "对应的用户id",required = true,paramType = "query",dataType = "int")
    })
    @RequestMapping(value = "/findUserByUserIdShipu",method = RequestMethod.GET)
    public ResponseData<UserYxy> findUserByUserIdShipu(int userId){

        return userYxyService.findUserByUserIdShipu(userId);
    }

}

